<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org" lang="zh-CN">

<div th:fragment="content">
    <div class="form-group">
        <label class="col-sm-2 control-label">帐号 <strong class="driverVerifcateRequired">*</strong></label>
        <div class="col-sm-4">
            <input class="form-control" name="username" type="text" maxlength="32" dbsyncer-valid="require" placeholder="admin" th:value="${connector?.config?.username}"/>
        </div>
        <label class="col-sm-2 control-label">密码 <strong class="driverVerifcateRequired">*</strong></label>
        <div class="col-sm-4 ">
            <input class="form-control" name="password" type="password" maxlength="32" dbsyncer-valid="require"
                   th:value="${connector?.config?.password}"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">SQL <strong class="driverVerifcateRequired">*</strong></label>
        <div class="col-sm-10">
            <textarea id="sql" name="sql" class="form-control dbsyncer_textarea_resize_none" maxlength="8192"
                      dbsyncer-valid="require" rows="10"
                      th:text="${connector?.config?.sql}?:'SELECT T1.*,ROWIDTOCHAR(ROWID) as RID FROM &quot;USER&quot; T1'"></textarea>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-6"></div>
        <div class="col-sm-6 text-right">
            <a href="javascript:beautifySql();"><span class="fa fa-magic fa-1x fa-flip-horizontal dbsyncer_pointer"
                                                      title="美化SQL"></span>美化SQL</a>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">主表 <strong class="driverVerifcateRequired">*</strong></label>
        <div class="col-sm-4">
            <input class="form-control" name="table" type="text" maxlength="32" dbsyncer-valid="require"
                   placeholder="USER" th:value="${connector?.config?.table}"/>
        </div>
        <label class="col-sm-2 control-label">主键 <i class="fa fa-question-circle fa_gray" aria-hidden="true" title="如果使用的表没有主键，可以自定义主键（大小写必须一致，添加表映射关系时，主键不能为空）。"></i><strong class="driverVerifcateRequired">*</strong></label>
        <div class="col-sm-4">
            <input class="form-control" name="primaryKey" type="text" maxlength="32" dbsyncer-valid="require"
                   placeholder="ID" th:value="${connector?.config?.primaryKey}"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">URL <strong class="driverVerifcateRequired">*</strong></label>
        <div class="col-sm-10">
            <textarea name="url" class="form-control dbsyncer_textarea_resize_none" maxlength="512" dbsyncer-valid="require" rows="5" th:text="${connector?.config?.url}?:'jdbc:oracle:thin:@127.0.0.1:1521:ORCL'"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">架构名 </label>
        <div class="col-sm-4">
            <input class="form-control" name="schema" type="text" maxlength="32" th:value="${connector?.config?.schema}"/>
        </div>
        <div class="col-sm-6"></div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">驱动 </label>
        <div class="col-sm-10">
            <input class="form-control" readonly="true" name="driverClassName" type="text" value="oracle.jdbc.OracleDriver" />
        </div>
    </div>
</div>

</html>